package edu.buffalo.son.garman.entity;

import edu.buffalo.son.garman.ICD9ToCategory;

public class ClaimsRecord {
	
	private final String personId;
	private final String dateOfService;
	private final ClaimType claimType;
	private final String dx1;
	private final String dx2;
	private final String dx3;
	private final String dx4;
	private final String dx5;
	public ClaimsRecord(String personId, String dateOfService,
			ClaimType claimType, String dx1, String dx2, String dx3,
			String dx4, String dx5) {
		super();
		personId = personId.replaceFirst("\\.00", "");
		this.personId = personId;
		this.dateOfService = dateOfService;
		this.claimType = claimType;
		this.dx1 = ICD9ToCategory.getFormattedICD9Code(dx1);
		this.dx2 = ICD9ToCategory.getFormattedICD9Code(dx2);
		this.dx3 = ICD9ToCategory.getFormattedICD9Code(dx3);
		this.dx4 = ICD9ToCategory.getFormattedICD9Code(dx4);
		this.dx5 = ICD9ToCategory.getFormattedICD9Code(dx5);
		//System.out.println(this);
	}
	
	public String getPersonId() {
		return personId;
	}
	
	public String getDateOfService() {
		return dateOfService;
	}
	
	public ClaimType getClaimType() {
		return claimType;
	}
	
	public String getDx1() {
		return dx1;
	}
	
	public String getDx2() {
		return dx2;
	}
	
	public String getDx3() {
		return dx3;
	}
	
	public String getDx4() {
		return dx4;
	}
	
	public String getDx5() {
		return dx5;
	}

    @Override
    public String toString() {
        return "ClaimsRecord [personId=" + personId + ", dateOfService="
                + dateOfService + ", claimType=" + claimType + ", dx1=" + dx1
                + ", dx2=" + dx2 + ", dx3=" + dx3 + ", dx4=" + dx4 + ", dx5="
                + dx5 + "]";
    }

}
